<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="language" content="en" />
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/styles.css" />
	<title><?php echo CHtml::encode($this->pageTitle); ?></title>
</head>

<body style="margin-top:140px">

<?php $this->widget('bootstrap.widgets.TbNavbar', array(
    'type'=>'inverse', // null or 'inverse'
    'brand'=>'<img src="css/img/data_logo.png"/>',
    'brandUrl'=>'#',
    'collapse'=>true, // requires bootstrap-responsive.css
    'items'=>array(
        array(
            'class'=>'bootstrap.widgets.TbMenu',
            'htmlOptions'=>array('class'=>'pull-right'),
            'items'=>array(
                array('label'=>'欢迎你，' . Yii::app()->user->name, 'url'=>'#', 'visible'=>!Yii::app()->user->isGuest),
                array('label'=>'登录', 'url'=>array('site/login'), 'visible'=>Yii::app()->user->isGuest),
                array('label'=>'退出登录', 'url'=>array('site/logout'), 'visible'=>!Yii::app()->user->isGuest),
                array('label'=>'联系我们', 'url'=>array('site/contact')),
            ),
        ),
    ),
)); ?>

<div class="container">
<?php echo $content; ?> 
<?php $this->widget('bootstrap.widgets.TbNavbar', array(
    'brand'=>false,
    'collapse'=>true, // requires bootstrap-responsive.css
    'htmlOptions'=>array('class'=>'subnav'),
    'items'=>array(
        array(
            'class'=>'bootstrap.widgets.TbMenu',
            'items'=>array(
                array('label'=>'主页', 'url'=>array('site/index/')),
                array('label'=>'平台作业', 'url'=>array('/job/index'), 'items'=>array(
                    array('label'=>'查询作业', 'url'=>array('/job/index', 'type'=>JobType::Query)),
                    array('label'=>'传输作业', 'url'=>array('/job/index', 'type'=>JobType::Transfer)),
                    array('label'=>'计算作业', 'url'=>array('/job/index', 'type'=>JobType::Compute)),
                )),
                array('label'=>'平台任务', 'url'=>array('/task/index'), 'items'=>array(
                    array('label'=>'查询任务', 'url'=>array('/task/index', 'type'=>TaskType::Query)),
                    array('label'=>'传输任务', 'url'=>array('/task/index', 'type'=>TaskType::Transfer)),
                    array('label'=>'计算任务', 'url'=>array('/task/index', 'type'=>TaskType::Compute)),
                    )),
                array('label'=>'资源管理', 'url'=>array('/resource/index'), 'items'=>array(
                    array('label'=>'原始日志', 'url'=>array('/resource/index', 'type'=>ResourceType::Log)),
                    array('label'=>'依赖文件', 'url'=>array('/resource/index', 'type'=>ResourceType::RelyFile)),
                    array('label'=>'查询输出', 'url'=>array('/resource/index', 'type'=>ResourceType::QueryOutput)),
                    array('label'=>'计算输出', 'url'=>array('/resource/index', 'type'=>ResourceType::ComputeOutput)),
                    )),
                array('label'=>'活动', 'url'=>array('/activity/index'), 'items'=>array(
                    array('label'=>'MapRed活动', 'url'=>array('/activity/index', 'type'=>ActivityType::MapRed)),
                    array('label'=>'Hive活动', 'url'=>array('/activity/index', 'type'=>ActivityType::HiveCli)),
                    array('label'=>'Mysql活动', 'url'=>array('/activity/index', 'type'=>ActivityType::MysqlCli)),
                    array('label'=>'Shell活动', 'url'=>array('/activity/index', 'type'=>ActivityType::Shell)),
                    array('label'=>'DataX活动', 'url'=>array('/activity/index', 'type'=>ActivityType::DataX)),
                    array('label'=>'Exec活动', 'url'=>array('/activity/index', 'type'=>ActivityType::Executable)),
                    )),
                array('label'=>'工作流', 'url'=>array('/workflow/index')),
                array('label'=>'调度器', 'url'=>array('/scheduler/index')),
                array('label'=>'执行器', 'url'=>array('/executor/index')),
                array('label'=>'存储系统', 'url'=>array('/storage/index')),
                array('label'=>'产品线', 'url'=>array('/product/index')),
                array('label'=>'用户', 'url'=>array('/user/index')),
                array('label'=>'WEB服务', 'url'=>'/api/index.php'),
            ),
        ),
        '<form class="navbar-search pull-left" action=""><input type="text" class="search-query span2" placeholder="search"></form>',
    ),
)); ?>
</div>
<div class="container">

    <hr>
    <footer class="row-fluid">
        <div class="powered span8"> <?php echo Yii::powered(); ?></div>
        <div class="copy span4">
            <div class="pull-right">
                Copyright &copy; <?php echo date('Y'); ?> by Qihoo 360. All Rights Reserved.
            </div>
        </div>

    </footer>
</div>
</body>
</html>
